<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>供需对接服务系统--项目发布（外部）</title>
    <!--公用样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/supplier/common/css/comment.css"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/supplier/common/css/style.css"/>
    <!--Layui-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <!--extended-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/extended.css"/>
    <!--公用样式JS-->
    <script type="text/javascript" src="${re.contextPath}/plugin/jquery/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
    <script type="text/javascript" src="${re.contextPath}/plugin/supplier/common/js/tel.js" charset="utf-8"></script>
</head>
<style>
    .Right {
        width: 100%;
        overflow-y: scroll;
    }

    .release ul:nth-child(2) li label {
        width: 18%;
        margin-right: 2%;
    }

    .release ul:first-child li label {
        width: 23%;
    }

    .release .address, .personnel .address {
        width: 65%;
    }

</style>

<body>
<!--头部-->
<header class="whitebg"></header>
<!--容器-->
<div class="container clearfix">
    <!--占位-->
    <!--右侧内容-->
    <div class="Right fr mt10">
        <form class="layui-form" id="myForm" style="margin-left: 20px;">
            <div id="lc_img_left" class="cursor" style="text-align: right;margin-right: 41px;">
                <a style="color: blue;"
                   onclick="handbook()"><img src="${re.contextPath}/plugin/common/images/wh.png"  style="width: 24px"> 发布指南</a></div>
            <div class="release">
                <ul class="clearfix whitebg">
                    <li class="clearfix">
                        <label class="fl">发布单位<span class="red">*</span> </label>
                        <input type="text" class="fl" id="publishCompanyname" lay-maxlength="30"
                               value="${user.companyName}" readonly="readonly"
                               lay-verify="required|maxlength">
                        <input type="hidden" class="fl" id="publishCompany" name="publishCompany"
                               value="${user.id}" readonly="readonly"
                               lay-verify="required">
                        <input type="hidden" id="supProjectId">
                    </li>
                    <li class="clearfix">
                        <label class="fl">发布人<span class="red">*</span> </label>
                        <input type="hidden" class="fl" id="publishBy" name="publishBy"  value="${user.id}"
                        >
                        <input type="text" class="fl"  value="${user.linkPerson}"  readonly="readonly"
                               lay-verify="required">

                    </li>
                    <li class="clearfix">
                        <label class="fl">联系电话<span class="red">*</span> </label>
                        <input type="text" name="linkTel" id="linkTel" lay-verify="required|phoneNumber"  value="${user.phoneNumber}">
                    </li>
                </ul>
                <ul class="clearfix whitebg mt20" style="text-align: right;">
                    <li class="clearfix">
                        <label class="fl">项目名称<span class="red">*</span> </label>
                        <input type="text" class="fl" id="projectName" name="projectName" lay-maxlength="200"
                               lay-verify="required|maxlength">
                    </li>
                    <li class="clearfix">
                        <label class="fl">项目类型<span class="red">*</span> </label>
                        <div class="category clearfix  xmlxdiv">
                            <#list projectTypeList as vo>
                                <#if "${vo.badtCode}"=="001">
                                    <input type="checkbox" class="fl h15 w25 " name="projectType${vo_index}" value="${vo.badtCode}" onchange="_crt_page.events.xmlxChange(this)" checked  lay-ignore >
                                <#else >
                                    <input type="checkbox" class="fl h15 w25 " name="projectType${vo_index}" value="${vo.badtCode}" onchange="_crt_page.events.xmlxChange(this)"  lay-ignore >
                                </#if>
                                <span class="fl mr10" >${vo.badtName}</span>
                            </#list>
                        </div>
                    </li>
                    <li class="clearfix"  style="width: 100%;" >
                        <label class="fl"  style="width: 9%;margin-right: 1%;">项目建设总投资<span class="red">*</span></label>
                        <input  style="width: 25%;"type="text" class="fl unit-ind-1" name="tzMoney" id="tzMoney" lay-maxlength="20"
                               lay-verify="required|decimal|maxlength">
                        <span class="fl ml10">元</span>
                    </li>
                    <li class="clearfix lx001">
                        <label class="fl">监理服务费<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="jlFwMoney" id="jlFwMoney" lay-maxlength="20" lay-verify="required|decimal|maxlength"
                               >
                        <span class="fl ml10">元</span>
                    </li>
          <#--          <li class="clearfix lx001">
                        <label class="fl">监理实施费用<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="jlSsMoney" id="jlSsMoney" readonly="readonly" lay-maxlength="20" lay-verify="required|decimal|maxlength">

                        <span class="fl ml10">元</span>
                    </li>-->
                    <li class="clearfix lx002 hide">
                        <label class="fl">咨询服务费<span class="red">*</span></label>
                        <input type="text"  class="fl unit-ind-1" name="zxFwMoney" id="zxFwMoney" lay-maxlength="20"
                        >
                        <span class="fl ml10">元</span>
                    </li>
                <#--    <li class="clearfix lx002 hide" >
                        <label class="fl">咨询实施费用<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="zxSsMoney" id="zxSsMoney" lay-maxlength="20"    readonly="readonly"
                        >
                        <span class="fl ml10">元</span>
                    </li>-->
                    <li class="clearfix lx003 hide">
                        <label class="fl">检测服务费<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="jcFwMoney" id="jcFwMoney" lay-maxlength="20"
                               >
                        <span class="fl ml10">元</span>
                    </li>
               <#--     <li class="clearfix lx003 hide">
                        <label class="fl">检测实施费用<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="jcSsMoney" id="jcSsMoney" lay-maxlength="20"  readonly="readonly"
                        >
                        <span class="fl ml10">元</span>
                    </li>-->
                    <li class="clearfix lx100 hide">
                        <label class="fl">其他服务费<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="qtFwMoney" id="qtFwMoney" lay-maxlength="20"
                              >
                        <span class="fl ml10">元</span>
                    </li>
           <#--         <li class="clearfix lx100 hide">
                        <label class="fl">其他实施费用<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="qtSsMoney" id="qtSsMoney" lay-maxlength="20"  readonly="readonly"
                               lay-verify="">
                        <span class="fl ml10">元</span>
                    </li>-->
                    <li class="clearfix">
                        <label class="fl"  >无人应接<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="days" id="days" value="0"
                               lay-verify="required|decimalDay">
                        <span class="fl ml10">天增加费用</span>
                    </li>
                    <li class="clearfix">
                        <label class="fl" >公示天数<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="gsDays" id="gsDays"
                               lay-verify="required|decimalDay">
                        <span class="fl ml10">天</span>
                    </li>
                    <#-- ============================================================================================-->
                    <li class="clearfix">
                        <label class="fl"  >合同编号</label>
                        <input type="text" class="fl unit-ind-1" name="contractNo"  id="contractNo">
                    </li>
                    <#--<li class="clearfix">
                        <label class="fl"  style="width: 20%;">内部合同编号</label>
                        <input type="text" class="fl unit-ind-1" name="insideContractNo" id="insideContractNo">
                    </li>-->
                    <li class="clearfix">
                        <label class="fl"  >采购/项目编号</label>
                        <input type="text" class="fl unit-ind-1" name="payOrProjectNo" id="payOrProjectNo">
                    </li>
                    <li class="clearfix">
                        <label class="fl"  >客户名称<span class="red">*</span></label>
                        <input type="text" class="fl unit-ind-1" name="owerCompany" id="owerCompany" lay-verify="required" value="${user.linkPerson}">
                    </li>
                    <li class="clearfix">
                        <label class="fl" >客户联系人</label>
                        <input type="text" class="fl unit-ind-1" name="projectLeader" id="projectLeader"  value="${user.linkPerson}">
                    </li>
                    <li class="clearfix">
                        <label class="fl"  >联系人职务</label>
                        <input type="text" class="fl unit-ind-1" name="duty" id="duty">
                    </li>
                    <li class="clearfix">
                        <label class="fl"  >中标信息查询网址</label>
                        <input type="text" class="fl unit-ind-1" name="queryWeb" id="queryWeb">
                    </li>
                    <#--<li class="clearfix">
                        <label class="fl"  style="width: 20%;">项目归属</label>
                        <select class="fl" id="projectOwner" name="projectOwner" lay-ignore>
                            <option value="">请选择</option>
                            <#list comlistOwner as vo>
                                <option value="${vo.bcId}">${vo.bcName}</option>
                            </#list>
                        </select>
                    </li>-->
                    <#-- ============================================================================================-->
                    <li class="clearfix">
                        <label class="fl"  >工期</label>
                        <input type="text" class="fl unit-ind-1" name="gqReq" id="gqReq"
                               >
<#--                        <span class="fl ml10">月</span>-->
                    </li>
                    <li class="clearfix"  >
                        <label class="fl"  >招标截止时间<span class="red">*</span></label>
                        <input type="text" class="fl" style="width: 25%;" name="zbEndDate" placeholder="选择时间" lay-verify="required"
                               autocomplete="off" id="zbEndDate" lay-verify="zbEndDate">
                    </li>
                    <li class="clearfix">
                        <label class="fl">合同签订地点<span class="red">*</span></label>
                        <div style="text-align: left;">
                        <select name="htSignProvince" class="ml8" id="htsignprovince" style="width:90px !important;" onchange="_crt_page.events.provinceChange(this)"
                                lay-verify="required" lay-ignore>
                            <option value="">请选择</option>
                            <#list provincelist as vo>
                                <option value="${vo.code}">${vo.name}</option>
                            </#list>
                        </select>
                        <select name="htSignCity" id="htsigncity" class="ml8" lay-verify="required" onchange="_crt_page.events.cityChange(this)"
                                style="width: 90px !important;margin-left: 10px" lay-ignore>
                            <option value="">请选择</option>
                        </select>
                        <select name="htSignCounty" id="htsigncounty" class="ml8" lay-filter="htsigncounty" lay-verify="required"
                                style="width:90px !important;margin-left: 10px" lay-ignore>
                            <option value="">请选择</option>
                        </select>
                        </div>
                    </li>
                    <li class="clearfix">
                        <label class="fl">行业类型<span class="red">*</span></label>
                        <select class="fl" id="hyType" name="hyType" lay-verify="required" lay-ignore>
                            <option value="">请选择</option>
                            <#list hytypelist as vo>
                                <option value="${vo.badtCode}">${vo.badtName}</option>
                            </#list>
                        </select>
                    </li>
                    <li class="clearfix" style="width: 100%;">
                        <label class="fl" style="width: 9%;margin-right: 1%;">实施地点</label>
                        <div class="address fl clearfix ssplace">
                            <div class="clearfix mt10 divplaceselect">
                                <select name="projectPlacedtos[0].province" class="ml8 fl" id="placeprovince0" onchange="_crt_page.events.provinceChange(this)" style="width:90px !important;"
                                         lay-ignore>
                                    <option value="">请选择</option>
                                    <#list provincelist as vo>
                                        <option value="${vo.code}">${vo.name}</option>
                                    </#list>
                                </select>
                                <select name="projectPlacedtos[0].city" id="placecity0" class="ml8 fl" lay-filter="city" onchange="_crt_page.events.cityChange(this)"
                                        style="width: 90px !important;margin-left: 10px" lay-ignore>
                                    <option value="">请选择</option>
                                </select>
                                <select name="projectPlacedtos[0].county" id="placecounty0" class="ml8 fl" lay-filter="county"
                                        style="width:90px !important;margin-left: 10px" lay-ignore>
                                    <option value="">请选择</option>
                                </select>
                                <img src="${re.contextPath}/plugin/common/images/77@2x.png" class="fl ml20 addplaceimage" onclick="_crt_page.events.addPlace(this)" >
                                <img src="${re.contextPath}/plugin/common/images/76@2x.png" class="fl ml20" onclick="_crt_page.events.deletePlace(this)">
                            </div>
<#--                            <div class="clearfix mt10 divplaceselect">-->
<#--                                <select name="projectPlacedtos[1].province" class="ml8 fl" id="placeprovince1" style="width:90px !important;"  onchange="_crt_page.events.provinceChange(this)"-->
<#--                                        lay-verify="required" lay-ignore>-->
<#--                                    <option value="">请选择</option>-->
<#--                                    <#list provincelist as vo>-->
<#--                                        <option value="${vo.code}">${vo.name}</option>-->
<#--                                    </#list>-->
<#--                                </select>-->
<#--                                <select name="projectPlacedtos[1].city" id="placecity1" class="ml8 fl"   onchange="_crt_page.events.cityChange(this)"  lay-filter="projectPlacedtos[1].city" lay-verify="required"-->
<#--                                        style="width: 90px !important;margin-left: 10px" lay-ignore>-->
<#--                                    <option value="">请选择</option>-->
<#--                                </select>-->
<#--                                <select name="projectPlacedtos[1].county" id="placecounty1" class="ml8 fl" lay-filter="projectPlacedtos[1].county" lay-verify="required"-->
<#--                                        style="width:90px !important;margin-left: 10px" lay-ignore>-->
<#--                                    <option value="">请选择</option>-->
<#--                                </select>-->
<#--                                <img src="${re.contextPath}/plugin/common/images/77@2x.png" class="fl ml20 addplaceimage" onclick="_crt_page.events.addPlace(this)" >-->
<#--                                <img src="${re.contextPath}/plugin/common/images/76@2x.png" class="fl ml20" onclick="_crt_page.events.deletePlace(this)">-->
<#--                            </div>-->
                        </div>
                    </li>
                    <li class="clearfix">
                        <label class="fl" style="width: 8.5%;margin-right: 1.5%;">其他需求</label>
                        <textarea name="otherXq" id="otherXq"  autocomplete="off" lay-maxlength="200"
                                  placeholder="请输入对项目的其他说明或需求,输入内容最大200个汉字"  lay-verify="maxlength"></textarea>
                    </li>
                </ul>
            </div>
            <div class="personnel whitebg">
                <div class="bold">主要负责人要求</div>
                <ul style="text-align: right">
                    <li class="clearfix">
                        <label class="fl" class="fl" style="width: 8%;margin-right: 1%;">性别：</label>
                        <select name="mainFzSex"  id="mainFzSex"  class="fl"  lay-ignore>
                            <option value="" selected>不限</option>
                            <option value="0">女</option>
                            <option value="1">男</option>
                        </select>
                    </li>
                    <li class="clearfix">
                        <label class="fl" class="fl" style="width: 8%;margin-right: 1%;">学历：</label>
                        <select name="mainFzXl" id="mainFzXl"   class="fl"  lay-ignore>
                            <option value="" selected>不限</option>
                            <#list edulist as vo>
                                <option value="${vo.badtCode}">${vo.badtName}</option>
                            </#list>
                        </select>
                    </li>
                    <li class="clearfix">
                        <label class="fl" class="fl" style="width: 8%;margin-right: 1%;">地区：</label>
                        <div class="address fl clearfix mainpersonplace">
                            <div class="clearfix mt10 divpersonplaceselect">
                                <select name="personPlacedtos[0].province" class="ml8 fl" id="personplaceprovince0" style="width:200px !important;" onchange="_crt_page.events.provinceChange(this)"
                                        lay-ignore>
                                    <option value="">请选择</option>
                                    <#list provincelist as vo>
                                        <option value="${vo.code}">${vo.name}</option>
                                    </#list>
                                </select>
                                <select name="personPlacedtos[0].city" id="personplacecity0" class="ml8 fl" lay-filter="city"
                                        style="width: 200px !important;margin-left: 10px" lay-ignore>
                                    <option value="">请选择</option>
                                </select>
                                <img src="${re.contextPath}/plugin/common/images/77@2x.png" class="fl ml20" onclick="_crt_page.events.addPersonPlace(this)">
                                <img src="${re.contextPath}/plugin/common/images/76@2x.png" class="fl ml20" onclick="_crt_page.events.deletePersonPlace(this)">
                            </div>
                        </div>
                    </li>
                    <li class="clearfix">
                        <label class="fl" class="fl" style="width: 8%;margin-right: 1%;">擅长领域：</label>
                        <div class="category clearfix fl">
                            <#list doBestList as vo>
                                <div style="display: inline-block">
                                    <input type="checkbox" class="fl h15 w25 doBestInput" name="mainFzField" value="${vo.badtCode}"  lay-ignore >
                                    <span class="fl mr10" >${vo.badtName}</span>
                                </div>
                            </#list>
                        </div>
                    </li>
                    <li class="clearfix">
                        <label class="fl" class="fl" style="width: 8%;margin-right: 1%;">需要出差：</label>
                        <select name="mainFzTrip" id="mainFzTrip" class="fl" lay-ignore>
                            <option value="0">否</option>
                            <option value="1">是</option>
                        </select>
                    </li>
                    <li class="clearfix">
                        <label class="fl" class="fl" class="fl" style="width: 8%;">备注：</label>
                        <textarea style="margin-right: 39.8%;" placeholder="请输入备注,输入内容最大200个汉字" id="mainFzRemark" name="mainFzRemark"
                                  autocomplete="off" lay-maxlength="200" lay-verify="maxlength"></textarea>
                        <input type="hidden" class="fl h15 w25 " id="311finish" name="zbsmFinish" value=""  lay-ignore >
                        <input type="hidden" class="fl h15 w25 " id="312finish" name="zbFinish"   value=""    lay-ignore >
                        <input type="hidden" class="fl h15 w25 " id="313finish" name="tbFinish"   value=""    lay-ignore >
                        <input type="hidden" class="fl h15 w25 " id="314finish" name="htFinish"   value=""    lay-ignore >
                        <input type="hidden" class="fl h15 w25 " id="315finish"  name="htsmFinish" value=""  lay-ignore >
                    </li>
                </ul>
            </div>
            <div class="downModule whitebg mt30">
                <ul>
                    <li  class="uploadli upload_zbwj_li">
                        <div class="clearfix upload_oper_div">
                            <div class="downModuleTip clearfix fl">
                                <span class="fl mt10"><strong>上传项目招标文件</strong>(项目招标文件上传的文件名称必须包含“招标”字样)</span>
                            </div>
                            <div class="downModuleBtn clearfix fr">
                                <img src="${re.contextPath}/plugin/common/images/18@2x.png" class="file-upload fl"  filedata="{'type':'312','projectType':'002'}" alt="" class="fl">
                                <img src="${re.contextPath}/plugin/common/images/19@2x.png" alt="" onclick="_crt_page.events.delFile(this)"  class="fl">
                                <button class="fl bluebg white fl ml20 upfinish"   style="display: none;"  type="button" lay-ignore="" onclick="_crt_page.events.finishfile(this)">完成</button>
                            </div>
                        </div>
                        <ul>
                        </ul>
                    </li>
                </ul>
            </div>
            <input type="hidden" name="contractDays" id="contractDays" value="">
            <input type="hidden" name="contractDate" id="contractDate" value="">
            <div class="releaseBtn center">
                <button type="submit" lay-submit lay-filter="save" onclick="resetRequired()"
                        class="bluebg white ft18" id="btnsave">保存</button>
                <button type="submit" lay-submit lay-filter="submit"onclick="resetRequiredSubmit()"
                        class="bluebg white ft18" id="btnsubmit">提交
                </button>
            </div>
        </form>

    </div>
</div>


<!--公用样式JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
<!--启动JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/jquery.boot.js"></script>
<!--启动JS-->
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/jquery.common.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/form.file.js"></script>
<script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/supplier/common/js/fileoper.js"></script>

<!-- 公共配置第三方组件 -->
<script type="text/javascript">
    layui.config({
        version: false,
        debug: false,
        base: "${re.contextPath}/plugin/layui/lay/extra/"
    })
</script>

<script>
    var layer, form, laydate, table, autocomplete;
    var _crt_page;
    layui.use(['form', 'laydate', 'layer', 'autocomplete'], function () {
        layer = layui.layer;
        form = layui.form;
        laydate = layui.laydate;

        $('.close').click(function () {
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
        });
        form.verify({
            maxlength: function (v,item) {
                var maxlength = item.getAttribute('lay-maxlength');
                if(v.trim()!=''){
                    if(v.trim().length>maxlength){
                        return "输入长度不能大于"+maxlength+"个字符！";
                    }
                }
            },
            phoneNumber: function(v) {
                if (v.trim() == '') {
                    return '手机号不能为空';
                } else {
                    if (!v.trim().isMobile() && !v.trim().isTel()) {
                        return '请输入正确的手机号码或电话号码\n\n例如:13916752109或0531-3614072';
                    }
                }
            },
            number: function (v) {
                if (v.trim() == '') {
                    return;
                }
                var reg = /^[0-9]*$/;
                var flag = reg.test(v.trim());
                if (!flag) {
                    return '请输入正确的数字';
                }
            },
            decimalDay: function (v) {
                if (v.trim() == '') {
                    return;
                }
                var reg = /^-?([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,2})?$/;
                var flag = reg.test(v.trim());
                if (!flag) {
                    return '请输入正确的天数';
                }
            },
            decimal: function (v) {
                if (v.trim() == '') {
                    return;
                }
                var reg = /^-?([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,10})?$/;
                var flag = reg.test(v.trim());
                if (!flag) {
                    return '请输入正确的金额';
                }
            },
            perdecimal: function (v) {
                if (v.trim() == '') {
                    return;
                }
                var reg = /^[1-9][0-9]*([.][0-9]+)?$/;
                var flag = reg.test(v.trim());
                if (!flag) {
                    if(v.trim()!="0"  || v.trim()!=0){
                        return '请输入数字';
                    }
                }
            },
            required: function () {

            },
            notnull: function (v, obj) {
                if (v == "") {
                    var str = $(obj).prev().text()
                    console.log(str)
                    return str + "必填项不能为空";
                }
            }
        })
        _crt_page = {
            init: function () {
                //初始化事件
                _crt_page.events._init();
                //初始化Form
                form.on('submit(save)', _crt_page.forms.save);
                form.on('submit(submit)', _crt_page.forms.commit);
            },
            forms:{
                save:function(data) {
                    var istg=_crt_page.events.saveBefore(data);
                    if(istg){
                        data.field.status="001";
                        var supProjectId =$("#supProjectId").val();
                        data.field.supProjectId=supProjectId;
                        if(data.field.jlFwMoney && Number(data.field.jlFwMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        if(data.field.zxFwMoney && Number(data.field.zxFwMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        if(data.field.jcFwMoney && Number(data.field.jcFwMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        if(data.field.qtFwMoney && Number(data.field.qtFwMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        if (data.field.tzMoney && Number(data.field.tzMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        layerAjax('/supplier/projectManager/addSave', data.field, '', function (d) {
                            if (d.flag == true) {
                                $("#supProjectId").val(d.data);
                                layer.msg(d.msg, {icon: 1});
                                $('#btnsave').addClass("layui-btn-disabled").attr("disabled",true);
                                $('#btnsubmit').addClass("layui-btn-disabled").attr("disabled",true);
                                setTimeout(tzym,2000);
                            } else {
                                layer.msg(d.msg, {icon: 2});
                                $('#btnsave').removeClass("layui-btn-disabled").attr("disabled",false);
                                $('#btnsubmit').removeClass("layui-btn-disabled").attr("disabled",false);
                            }
                        });
                    }
                    return false;
                },
                commit:function(data) {
                    var istg=_crt_page.events.saveBefore(data);
                    if(istg){
                        data.field.status="002";
                        var supProjectId =$("#supProjectId").val();
                        var  url='/supplier/projectManager/addSave';
                        if(supProjectId){
                            //保存之后又点击提交
                            data.field.supProjectId=supProjectId;
                        }
                        if(data.field.jlFwMoney && Number(data.field.jlFwMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        if(data.field.zxFwMoney && Number(data.field.zxFwMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        if(data.field.jcFwMoney && Number(data.field.jcFwMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        if(data.field.qtFwMoney && Number(data.field.qtFwMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        if (data.field.tzMoney && Number(data.field.tzMoney)<=0){
                            layer.msg('金额不正确', {icon: 2});return false;
                        }
                        layerAjax(url, data.field, '', function (d) {
                            if (d.flag == true) {
                                $("#supProjectId").val(d.data);
                                layer.msg("提交成功，请耐心等待平台审核", {icon: 1});
                                $('#btnsave').addClass("layui-btn-disabled").attr("disabled",true);
                                $('#btnsubmit').addClass("layui-btn-disabled").attr("disabled",true);
                                setTimeout(tzym,2000);
                            } else {
                                $('#btnsave').removeClass("layui-btn-disabled").attr("disabled",false);
                                $('#btnsubmit').removeClass("layui-btn-disabled").attr("disabled",false);
                                layer.msg(d.msg, {icon: 2});
                            }
                        });
                    }
                    return false;
                }

            },
            events: {
                _init: function () {
                    form.on('submit(save)', _crt_page.forms.create);
                    form.on('submit(submit)', _crt_page.forms.commit);
                    _crt_page.events.gqdateInit();
                    _crt_page.events.uploadInit();
                },
                gqdateInit: function () {
                    // 工期开始时间
                    laydate.render({
                        elem: '#gqBeginDate',
                        trigger: 'click',
                        done: function (value, date) {
                            var that = $(this.elem[0])
                            console.log(that);
                            var  endDate=$("#gqEndDate").val();
                            if(endDate  && endDate<value){
                                layer.msg("开始时间不能大于结束时间", {icon: 2});
                                $(that).val("");
                                return ;
                            }
                        }
                    });
                    // 工期截止时间
                    laydate.render({
                        elem: '#gqEndDate',
                        trigger: 'click',
                        done: function (value, date) {
                            var that = $(this.elem[0])
                            console.log(that);
                            var  startDate=$("#gqBeginDate").val();
                            if(startDate  && startDate>value){
                                layer.msg("结束时间不能小于开始时间", {icon: 2});
                                $(that).val("");
                                return ;
                            }
                        }
                    });
                    // 招标截止时间
                    laydate.render({
                        elem: '#zbEndDate',
                        trigger: 'click',
                        type:'datetime',
                        format: 'yyyy-MM-dd HH:mm'

                    });
                    // 合同签订时间
                    laydate.render({
                        elem: '#htSignDate',
                        trigger: 'click',
                        type:'datetime',
                        format: 'yyyy-MM-dd HH:mm'
                    });

                },
                uploadInit:function(){
                    $(".upfinish").addClass("layui-btn-disabled").attr("disabled",true);
                    var tempFileIds = [];
                    $.each($('.file-upload'),function(i,e){
                        //绑定一个个上传文件:
                        var fileDataStr = $(e).attr('filedata');
                        //至少fileData中需要有文件的类型编码
                        var fileData = eval('(' + fileDataStr + ')');
                        var fileContainer = $(e).parents(".upload_oper_div").next();
                        var type = fileData.type;
                        var ext = '';
                        // if(type == '311'){
                        //     //书著文件,只能上传文档
                        //     ext = 'doc|docx';
                        // }else if(type == '312'){
                        //     //扫描件,只能上传pdf
                        //     ext = 'doc|docx|pdf';
                        // }else if(type == '313'){
                        //     ext = 'doc|docx';
                        // }else if(type == '314'){
                        //     ext = 'doc|docx';
                        // }else if(type == '315'){
                        //     ext = 'doc|docx';
                        // }
                        //上传组件参数自定义:
                        var uploadPara = {
                            elem: $(e),
                            accept: 'file',
                            temp: "1",
                            exts: ext,
                            before: function(res){
                                this.data = fileData;
                            },
                            done:function(res){
                                if(res.flag){
                                    var newFileId = res.data.id;
                                    var type =res.data.type+'';
                                    var newIndex = $('.form-file-div').length*1;
                                    layer.msg("上传成功",{icon:1});
                                    if(type=='315'){
                                        setTimeout(function(){
                                            layer.open({
                                                id:1,
                                                type: 1,
                                                title:'填写合同预计上传天数',
                                                style: 'width:80%;height:auto;',
                                                content: "<div style='display:flex;justify-content:center;'><input type='text' id='area' placeholder='天数' style='width:88%;height:40px;margin-top:11px;'/></div>",
                                                btn:['确定','取消'],
                                                yes:function (index,layero) {
                                                    //获取输入框里面的值
                                                    var closeContent = top.$("#area").val() || $("#area").val();
                                                    let temp = /^\d+$/; // 非负整数
                                                    if (!temp.test(closeContent)) {
                                                        layer.msg('只能为整数');return false;
                                                    }
                                                    if(closeContent){
                                                        $("#contractDays").val(closeContent);
                                                        $("#contractDate").val(getFormatDate());
                                                    }
                                                    layer.close(index);
                                                },
                                                no:function (index,layero) {
                                                }
                                            });
                                        },1000)
                                    }
                                    $(e).parent().find(".upfinish").removeClass("layui-btn-disabled").attr("disabled",false);
                                    $(fileContainer).append("    <li class=\"clearfix form-file-div form-file-div-"+type+"\">" +
                                        "                            <input type=\"checkbox\" class=\"fl\"  style=\"display: inline-block;\" lay-ignore>\n" +
                                        "                            <span class=\"fl ml10\">"+res.data.fileName+"</span>\n" +
                                        '                            <input type="hidden" class="'+type+'-input" name="tempFormFileIds['+newIndex+']" value="'+newFileId+'" />'+
                                        "                        </li>");
                                }else{
                                    if(res.msg){
                                        layer.msg(res.msg, {icon: 2})
                                    }else {
                                        layer.msg("上传失败", {icon: 2})
                                    }
                                }
                            },
                            container: fileContainer
                            // fileOrder: 'desc'
                        };
                        _form_file.upload.bind(uploadPara);
                    })
                },
                finishfile:function(object){
                    debugger;
                    var length = $(object).parents(".uploadli").find("ul").find("li").length;
                    if(length==0){
                        layer.msg("请上传文件",{icon:2})
                        return ;
                    }

                    var fileDataStr =$(object).parent().find(".file-upload ").attr('filedata');
                    //至少fileData中需要有文件的类型编码
                    var fileData = eval('(' + fileDataStr + ')');
                    var  finishId=fileData.type+"finish";
                    $("#"+finishId).val("1");
                    layer.msg("操作成功",{icon:1});

                },
                delFile:function(object){
                    var checkbox = $(object).parents(".uploadli").find("ul").find("li").find("input:checked");
                    if (checkbox.length == 0) {
                        layer.msg("请选择文件", {icon: 2});
                        return;
                    }
                    var ids = [];
                    checkbox.each(function (i, v) {
                        var _a = $(v).parents("li .form-file-div-312").find("[type=\"hidden\"]").attr("value");
                        ids.push(_a);
                    });
                    var ids = ids.join(',');
                    layer.confirm('确定删除文件吗？', function (index) {
                        layerAjax('/supplier/deleteFile', {"ids": ids}, '', function (d) {
                            if(d.flag){
                                checkbox.each(function (i, v) {
                                    $(v).parent().remove();
                                });
                                layer.msg("删除成功！");
                            }else{
                                layer.msg(d.msg, {icon: 2});
                            }
                        });
                    });

                },
                saveBefore:function(data){
                    var isTg = true;
                    var lxlength= $(".xmlxdiv").find("[type='checkbox']:checked").length;
                    if(lxlength==0){
                        layer.msg("请选择项目类型", {icon: 2});
                        isTg=false;
                        return isTg;
                    }
                    var  lxsz=[];
                    $(".xmlxdiv").find("[type='checkbox']:checked").each(function (i,v) {
                        var lxvalue=$(v).attr("value");
                        lxsz.push(lxvalue);
                    });

                    lxsz = lxsz.join(',');
                    data.field.projectType=lxsz;
                    var  dobest=[];
                    $(".doBestInput:checked").each(function (i,v) {
                        var value=$(v).attr("value");
                        dobest.push(value);
                    });
                    dobest = dobest.join(',');
                    data.field.mainFzField=dobest;
                    return isTg;
                },
                ssfybulur:function(object){
                    var ssfy=$(object).val();
                    var ssblper='${ssblper}';
                    if(ssfy){
                        var  fwfy=(ssfy*ssblper).toFixed(2);
                        $(object).parent().next().find("input").val(fwfy);
                    }

                },
                xmlxChange:function(object){
                    var lxvalue=  $(object).attr("value");
                    if($(object).prop("checked")){
                        $(".lx"+lxvalue).attr("style","display:block;")
                        $(".lx"+lxvalue).find("input").attr("lay-verify","required|decimal|maxlength")
                    }else{
                        $(".lx"+lxvalue).attr("style","display:none;")
                        $(".lx"+lxvalue).find("input").removeAttr("lay-verify");
                        $(".lx"+lxvalue).find("input").val("");
                    }
                    var lxlength= $(".xmlxdiv").find("[type='checkbox']:checked").length;
                    var  lxsz=[];
                    $(".xmlxdiv").find("[type='checkbox']:checked").each(function (i,v) {
                        var lxvalue=$(v).attr("value");
                        lxsz.push(lxvalue);
                    });
                    lxsz = lxsz.join(',');

                },
                needZtbChange:function(object){
                    var lxvalue=  $(object).attr("value");
                    if($(object).prop("checked")  && lxvalue=='1'  ){
                        $(".LIisZb").css({"display":"block","width":"60%"});
                    }else{
                        // 是否招标不显示
                        $(".LIisZb").attr("style","display:none;")
                        $(".LIisZb").find("input").prop('checked',false);
                        /*             $(".LIqdHt").attr("style","display:none;")
                                     $(".LIqdHt").find("input").prop('checked',false);
                                     $(".sfk").attr("style","display:none;")
                                     $(".sfk").find("input").prop('checked',false);
                                     $(".htqdhj").attr("style","display:none;")
                                     $(".htqdhj").find("input").val("");*/
                    }
                    _crt_page.events.radioChange();
                },
                isZbChange:function(object){
                    var lxvalue=  $(object).attr("value");
                    if($(object).prop("checked")  && lxvalue=='1'  ){
                        $(".LIqdHt").css({"display":"block","width":"60%"});
                        $(".LIqdHt").find("input").prop('disabled',false);
                    }else{
                        //是否已签合同（默认“否”，不可修改）
                        $(".LIqdHt").css({"display":"block","width":"60%"});
                        $(".LIqdHt").find("input").prop('checked',true);
                        $(".LIqdHt").find("input").prop('disabled',true);

                        $(".sfk").attr("style","display:none;")
                        $(".sfk").find("input").prop('checked',false);
                        $(".htqdhj").attr("style","display:none;")
                        $(".htqdhj").find("input").val("");
                    }
                    _crt_page.events.radioChange();
                },
                qdHtChange:function(object){
                    var lxvalue=  $(object).attr("value");
                    if($(object).prop("checked")  && lxvalue=='1'  ){
                        $(".sfk").css({"display":"block","width":"60%"});
                        $(".htqdhj").css({"display":"block","width":"60%"});
                        $(".htqdhj").find("input").attr("lay-verify","required")
                    }else{
                        $(".sfk").attr("style","display:none;")
                        $(".sfk").find("input").prop('checked',false);
                        $(".htqdhj").find("input").removeAttr("lay-verify")
                        $(".htqdhj").attr("style","display:none;")
                        $(".htqdhj").find("input").val("");
                    }
                    _crt_page.events.radioChange();
                },
                radioChange:function(){
                    // (1) ，则显示 “上传项目招标文件”、“上传项目投标文件”、“上传合同


                    var ztb= $(".divneedzb").find("[type='radio']:checked").attr("value");
                    var iszb= $(".LIisZb").find("[type='radio']:checked").attr("value");
                    var qdht= $(".LIqdHt").find("[type='radio']:checked").attr("value");
                    if(ztb=="1"  && iszb=="1"   && qdht=="1"  ){
                        //  则显示 “上传项目招标文件”、“上传项目投标文件”、“上传合同”。
                        $(".upload_zbwj_li").css('display','block');
                        $(".upload_tbwj_li").css('display','block');
                        $(".upload_ht_li").css('display','block');


                        $(".upload_zbwjsmw_li").find("ul").find("li").remove();
                        $(".upload_htsmwj_li").find("ul").find("li").remove();
                        $(".upload_zbwjsmw_li").css('display','none');
                        $(".upload_htsmwj_li").css('display','none');
                    }
                    if(ztb=="1"  && iszb=="1"   && qdht=="0"  ){
                        //  则显示 “上传项目招标文件”、“上传项目投标文件”、“上传合同”。
                        $(".upload_zbwj_li").css('display','block');
                        $(".upload_tbwj_li").css('display','block');
                        $(".upload_htsmwj_li").css('display','block');


                        $(".upload_zbwjsmw_li").find("ul").find("li").remove();
                        $(".upload_ht_li").find("ul").find("li").remove();
                        $(".upload_zbwjsmw_li").css('display','none');
                        $(".upload_ht_li").css('display','none');

                    }
                    if(ztb=="1"  && iszb=="0"   && qdht=="0"  ){
                        //  “上传项目招标文件说明文件”、“上传合同说明文件”
                        $(".upload_zbwjsmw_li").css('display','block');
                        $(".upload_htsmwj_li").css('display','block');


                        $(".upload_zbwj_li").find("ul").find("li").remove();
                        $(".upload_tbwj_li").find("ul").find("li").remove();
                        $(".upload_ht_li").find("ul").find("li").remove();
                        $(".upload_zbwj_li").css('display','none');
                        $(".upload_tbwj_li").css('display','none');
                        $(".upload_ht_li").css('display','none');
                    }
                    if(ztb=="0"    && qdht=="1"  ){
                        //  “上传项目招标文件说明文件”、“上传合同说明文件”
                        $(".upload_ht_li").css('display','block');


                        $(".upload_zbwjsmw_li").find("ul").find("li").remove();
                        $(".upload_htsmwj_li").find("ul").find("li").remove();
                        $(".upload_zbwj_li").find("ul").find("li").remove();
                        $(".upload_tbwj_li").find("ul").find("li").remove();
                        $(".upload_zbwjsmw_li").css('display','none');
                        $(".upload_htsmwj_li").css('display','none');
                        $(".upload_zbwj_li").css('display','none');
                        $(".upload_tbwj_li").css('display','none');
                    }
                    if(ztb=="0"    && qdht=="0"  ){
                        //  “上传项目招标文件说明文件”、“上传合同说明文件”
                        $(".upload_htsmwj_li").css('display','block');

                        $(".upload_zbwj_li").find("ul").find("li").remove();
                        $(".upload_tbwj_li").find("ul").find("li").remove();
                        $(".upload_ht_li").find("ul").find("li").remove();
                        $(".upload_zbwjsmw_li").find("ul").find("li").remove();

                        $(".upload_zbwj_li").css('display','none');
                        $(".upload_tbwj_li").css('display','none');
                        $(".upload_ht_li").css('display','none');
                        $(".upload_zbwjsmw_li").css('display','none');
                    }

                },
                provinceChange:function(object){
                    var code = $(object).find('option:selected').val();
                    if (code == "") {
                        return;
                    }
                    layerAjaxGet('/sys/register/getOrganize', {"code": code}, '', function (d) {
                        if (d.flag == true) {
                            $(object).next().empty().append("<option value=''>选择市</option>");
                            for (var i = 0; i < d.data.length; i++) {
                                $(object).next().append("<option value='" + d.data[i].code + "'>" + d.data[i].name + "</option>");
                            }
                        } else {
                            layer.msg(d.msg, {icon: 2});
                        }
                    });


                },
                cityChange:function(object){
                    var code = $(object).find('option:selected').val();
                    if (code == "") {
                        return;
                    }
                    layerAjaxGet('/sys/register/getOrganize', {"code": code}, '', function (d) {
                        if (d.flag == true) {
                            $(object).next().empty().append("<option value=''>选择区县</option>");
                            for (var i = 0; i < d.data.length; i++) {
                                $(object).next().append("<option value='" + d.data[i].code + "'>" + d.data[i].name + "</option>");
                            }
                        } else {
                            layer.msg(d.msg, {icon: 2});
                        }
                    });


                },
                personPlaceProvinceInit:function(){
                    $(".mainpersonplace").find("div").each(function (i,v) {
                        var provinceId=$(v).find("select:first").attr("id");
                        var cityId=$(v).find("select:eq(1)").attr("id");
                        $("#"+provinceId).change(function () {
                            var code = $('#'+provinceId+' option:selected').val();
                            if (code == "") {
                                return;
                            }
                            layerAjaxGet('/sys/register/getOrganize', {"code": code}, '', function (d) {
                                if (d.flag == true) {
                                    $("#"+cityId).empty().append("<option value=''>选择市</option>");
                                    for (var i = 0; i < d.data.length; i++) {
                                        $("#"+cityId).append("<option value='" + d.data[i].code + "'>" + d.data[i].name + "</option>");
                                    }
                                } else {
                                    layer.msg(d.msg, {icon: 2});
                                }
                            });

                        });
                    });
                },
                placeCityInit:function(){
                    $(".ssplace").find("div").each(function (i,v) {
                        var cityId=$(v).find("select:eq(1)").attr("id");
                        var countyId=$(v).find("select:eq(2)").attr("id");
                        $("#"+cityId).change(function () {
                            var code = $('#'+cityId+' option:selected').val();
                            if (code == "") {
                                return;
                            }
                            layerAjaxGet('/sys/register/getOrganize', {"code": code}, '', function (d) {
                                if (d.flag == true) {
                                    $("#"+countyId).empty().append("<option value=''>选择区县</option>");
                                    for (var i = 0; i < d.data.length; i++) {
                                        $("#"+countyId).append("<option value='" + d.data[i].code + "'>" + d.data[i].name + "</option>");
                                    }
                                } else {
                                    layer.msg(d.msg, {icon: 2});
                                }
                            });

                        });
                    });

                },
                resetPlace:function(){
                    /*  $(".ssplace").find(".addplaceimage:not(:last)").attr("style","display:none;")*/
                    $(".ssplace").find(".divplaceselect").each(function (i,v) {
                        $(v).find("select:eq(0)").attr("name","projectPlacedtos["+i+"].province")
                        $(v).find("select:eq(1)").attr("name","projectPlacedtos["+i+"].city");
                        $(v).find("select:eq(2)").attr("name","projectPlacedtos["+i+"].county");
                        $(v).find("select:eq(0)").attr("lay-filter","projectPlacedtos["+i+"].province");
                        $(v).find("select:eq(1)").attr("lay-filter","projectPlacedtos["+i+"].city");
                        $(v).find("select:eq(2)").attr("lay-filter","projectPlacedtos["+i+"].county");
                    });
                },
                resetPersonPlace:function(){
                    /*  $(".ssplace").find(".addplaceimage:not(:last)").attr("style","display:none;")*/
                    $(".mainpersonplace").find(".divpersonplaceselect").each(function (i,v) {
                        $(v).find("select:eq(0)").attr("name","personPlacedtos["+i+"].province")
                        $(v).find("select:eq(0)").attr("lay-filter","personPlacedtos["+i+"].province");
                        $(v).find("select:eq(1)").attr("name","personPlacedtos["+i+"].city");
                        $(v).find("select:eq(1)").attr("lay-filter","personPlacedtos["+i+"].city");

                    });
                },
                deletePlace:function(object){
                    var placeLength=$(".ssplace").find(".divplaceselect").length;
                    if(placeLength==1){
                        layer.msg("实施地点不能全部删除", {icon: 2});
                    }else{
                        $(object).parent().remove();
                        _crt_page.events.resetPlace();
                    }

                },
                addPlace:function(object){
                    $(object).parent().after(" <div class=\"clearfix mt10 divplaceselect\">\n" +
                        "                            <select name=\"projectPlacedtos[1].province\" class=\"ml8 fl\" id=\"placeprovince1\"   onchange=\"_crt_page.events.provinceChange(this)\"  style=\"width:90px !important;\"\n" +
                        "                                    lay-verify=\"required\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                                <#list provincelist as vo>\n" +
                        "                                    <option value=\"${vo.code}\">${vo.name}</option>\n" +
                        "                                </#list>\n" +
                        "                            </select>\n" +
                        "                            <select name=\"projectPlacedtos[1].city\" id=\"placecity1\" class=\"ml8 fl\"  onchange=\"_crt_page.events.cityChange(this)\" lay-filter=\"projectPlacedtos[1].city\" lay-verify=\"required\"\n" +
                        "                                    style=\"width: 90px !important;margin-left: 10px\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                            </select>\n" +
                        "                            <select name=\"projectPlacedtos[1].county\" id=\"placecounty1\" class=\"ml8 fl\" lay-filter=\"projectPlacedtos[1].county\" lay-verify=\"required\"\n" +
                        "                                    style=\"width:90px !important;margin-left: 10px\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                            </select>\n" +
                        "                            <img src=\"${re.contextPath}/plugin/common/images/77@2x.png\" class=\"fl ml20 addplaceimage\" onclick=\"_crt_page.events.addPlace(this)\" >\n" +
                        "                            <img src=\"${re.contextPath}/plugin/common/images/76@2x.png\" class=\"fl ml20\" onclick=\"_crt_page.events.deletePlace(this)\">\n" +
                        "                        </div>");
                    _crt_page.events.resetPlace();

                },
                addPersonPlace:function (object) {
                    $(object).parent().after("\n" +
                        "                        <div class=\"clearfix mt10 divpersonplaceselect\">\n" +
                        "                            <select name=\"personPlacedtos[0].province\" class=\"ml8 fl\"   onchange=\"_crt_page.events.provinceChange(this)\" id=\"personplaceprovince0\" style=\"width:200px !important;\"\n" +
                        "                                    lay-verify=\"required\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                                <#list provincelist as vo>\n" +
                        "                                    <option value=\"${vo.code}\">${vo.name}</option>\n" +
                        "                                </#list>\n" +
                        "                            </select>\n" +
                        "                            <select name=\"personPlacedtos[0].city\" id=\"personplacecity0\" class=\"ml8 fl\" lay-filter=\"city\" lay-verify=\"required\"\n" +
                        "                                    style=\"width: 200px !important;margin-left: 10px\" lay-ignore>\n" +
                        "                                <option value=\"\">请选择</option>\n" +
                        "                            </select>\n" +
                        "                            <img src=\"${re.contextPath}/plugin/common/images/77@2x.png\" class=\"fl ml20\" onclick=\"_crt_page.events.addPersonPlace(this)\">\n" +
                        "                            <img src=\"${re.contextPath}/plugin/common/images/76@2x.png\" class=\"fl ml20\" onclick=\"_crt_page.events.deletePersonPlace(this)\">\n" +
                        "                        ");
                    _crt_page.events.resetPersonPlace();
                },
                deletePersonPlace:function (object) {
                    var placeLength=$(".mainpersonplace").find(".divpersonplaceselect").length;
                    if(placeLength==1){
                        $(".mainpersonplace").find(".divpersonplaceselect").find("select").val("");
                    }else{
                        $(object).parent().remove();
                        _crt_page.events.resetPersonPlace();
                    }

                }

            }
        };
        _crt_page.init();
    });
    //发布指南
    function handbook(){
        var w,h;
        if (w == null || w == '') {
            w = ($(window).width() *0.92);
        }
        ;
        if (h == null || h == '') {
            h = ($(window).height()-80);
        }
        layer.open({
            type: 2,
            title: '发布指南',
            shadeClose: true,
            shade: 0.8,
            maxmin: false,
            area: [w + 'px', h + 'px'],
            content: '/supplier/ruleCentre/publishGuide?badtCode=001&badtTypecode=FBZN001' //iframe的url
        });
    }
    //获取当前时间
    function getFormatDate(){
        var nowDate = new Date();
        var year = nowDate.getFullYear();
        var month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1;
        var date = nowDate.getDate() < 10 ? "0" + nowDate.getDate() : nowDate.getDate();
        var hour = nowDate.getHours()< 10 ? "0" + nowDate.getHours() : nowDate.getHours();
        var minute = nowDate.getMinutes()< 10 ? "0" + nowDate.getMinutes() : nowDate.getMinutes();
        var second = nowDate.getSeconds()< 10 ? "0" + nowDate.getSeconds() : nowDate.getSeconds();
        return year + "-" + month + "-" + date;
    }
    function resetRequired() {
        form.verify({
            required: function (v) {

            }
        })
    }

    function resetRequiredSubmit() {
        form.verify({
            required: function (v) {
                if (v == "") {
                    return "必填项不能为空";
                }
            }
        })
    }

    function tzym(){
        window.parent._delTabT('d978e55ce0264848ad4476c3fb1262f4');
        window.parent._showtab('57d00e5a44b543d3902081cf7ce6efcb', '我的项目', '/supplier/projectManager/myproject');
        window.parent._delTabT('cf8c85d3685a48abb23a4104ef25997c');
    }
</script>
</body>

</html>
